package com.hs.pre.sys.validate;

import java.util.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;


public class ValidateAction extends  org.apache.struts.actions.DispatchAction {

	public ActionForward login(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {

//		String doClass=request.getParameter("doClass");
//		if(doClass !=null && !(doClass=doClass.trim()).equals(""))
//		{
//		
//			/**
//			 * �û���¼
//			 */
//			if(doClass.equals("login")){
				return new LoginVali().loginValiExecute(mapping, form, request, response);
//			}
//		}
//		return null;
	}
	
	public ActionForward logout(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		/***
		 * 清楚该用户所有的 session 信息 
		 */
		request.getSession().invalidate();
		System.err.println("用户退出!");
		return mapping.findForward("pass");
	}
	
	
	
}
